import tkinter as tk
from tkinter import ttk

def test_tkinter():
    # 创建主窗口
    root = tk.Tk()
    root.title("Tkinter 测试窗口")
    root.geometry("300x200")
    
    # 添加标签
    label = ttk.Label(root, text="Hello, Tkinter!")
    label.pack(pady=20)
    
    # 添加按钮
    button = ttk.Button(root, text="点击我", command=lambda: print("按钮被点击了！"))
    button.pack(pady=10)
    
    # 运行主循环
    root.mainloop()

if __name__ == "__main__":
    test_tkinter()